package xyz.cerberu.cet.subtitle.domain;

import org.apache.solr.client.solrj.beans.Field;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Name β世界
 * Created on 14:26
 * @Description 字幕组
 */
public class Subtitle implements Serializable {
    @Field("sub_id")
    private int sub_id;
    @Field("subtitle_name")
    private String subtitle_name;

    public Subtitle() {
    }

    public Subtitle(int sub_id, String subtitle_name) {
        this.sub_id = sub_id;
        this.subtitle_name = subtitle_name;
    }

    public void setSub_id(int sub_id) {
        this.sub_id = sub_id;
    }

    public void setSubtitle_name(String subtitle_name) {
        this.subtitle_name = subtitle_name;
    }

    public int getSub_id() {
        return sub_id;
    }

    public String getSubtitle_name() {
        return subtitle_name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Subtitle subtitle = (Subtitle) o;
        return sub_id == subtitle.sub_id &&
                Objects.equals(subtitle_name, subtitle.subtitle_name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sub_id, subtitle_name);
    }

    @Override
    public String toString() {
        return "Subtitle{" +
                "sub_id=" + sub_id +
                ", subtitle_name='" + subtitle_name + '\'' +
                '}';
    }
}
